//
//  YSDownLoadListernDataTool.m
//  YSDownLoadManager_Example
//
//  Created by Kyson on 2018/12/4.
//  Copyright © 2018 kysonyangs. All rights reserved.
//

#import "YSDownLoadListernDataTool.h"
#import "YSSqliteModelTool.h"

@implementation YSDownLoadListernDataTool

+ (NSArray<YSDownloadBookModel *> *)getAllDownloadBooks {
    return [YSSqliteModelTool queryAllModels:[YSDownloadBookModel class] uid:nil];
}

+ (NSArray<YSDownloadBookModel *> *)getDownLoadingBooks {
    return [YSSqliteModelTool queryModels:[YSDownloadBookModel class] columnName:@"isDownload" relationType:RelationTypeEqual value:@"1" uid:nil];
}

+ (NSArray<YSDownloadBookModel *> *)getDownLoadSuccessBooks {
    return [YSSqliteModelTool queryModels:[YSDownloadBookModel class] columnName:@"isDownload" relationType:RelationTypeEqual value:@"0" uid:nil];
}

@end
